<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<p>p标签</p>
<div>div标签</div>
<div>div标签</div>
<div>div标签</div>
<p>p标签</p>
<span>span标签</span>
<span>span标签</span>
<span>span标签</span>
<p>p标签</p>

<pre>
    白日依山尽,
    黄河入海流。
    欲穷千里目,
    更上一层楼。
</pre>
<script>
    function each(arr,callback){
        for(var i=0;i<arr.length;i++){
            callback(arr[i],i)
        }
    }
    function selector(ele){
        var obj=document.querySelectorAll(ele);
        obj.each= function (callback) {
            each(obj,callback);
        }
        return obj;
    }
    selector("div").each(function (v) {
        v.style.border="1px solid green";

    })
    console.log({}.toString.apply([1, 2, 3]));

</script>
</body>
</html>